package de.dhbw.horb.inf2013.vierFarbenProblem.viewModel.datatype;

import de.dhbw.horb.inf2013.vierFarbenProblem.model.datatypes.Vertex;
import de.dhbw.horb.inf2013.vierFarbenProblem.model.datatypes.VertexNotSetException;

/**
 * The Interface Graph.
 */
public interface Graph {

	/**
	 * Adds the vertex.
	 * 
	 * @param v
	 *            the v
	 */
	public void addVertex(Vertex v);

	/**
	 * Adds the edge.
	 * 
	 * @param from
	 *            the from
	 * @param to
	 *            the to
	 * @throws VertexNotSetException
	 *             the vertex not set exception
	 */
	public void addEdge(int from, int to) throws VertexNotSetException;

	/**
	 * Gets the vertex.
	 * 
	 * @param id
	 *            the id
	 * @return the vertex
	 * @throws VertexNotSetException
	 *             the vertex not set exception
	 */
	public Vertex getVertex(int id) throws VertexNotSetException;

	/**
	 * Contains vertex.
	 * 
	 * @param id
	 *            the id
	 * @return true, if successful
	 */
	public boolean containsVertex(int id);

	/**
	 * Reset all.
	 */
	public void resetAll();

	/**
	 * counts the Vertexes
	 * 
	 * @return the number of Vertexes
	 */
	public int countVertexes();
}
